﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Rpt_Config_Data.aspx.cs" Inherits="H2.NET.Web.Reports.Config_Data" %>
<%@ Register Assembly="H2.NET.Controls" Namespace="H2.NET.Controls" TagPrefix="H2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>报表配置</title>
    <style type="text/css">       
        .gv_boder{width:100%; margin-top:3px;}
        .gv_boder th{height:20px; background-color:#EDEDED;color:#6C6B6B; text-align:left; font-size: 10pt;font-family:Arial;padding-left:2px;}
        .gv_header{font-size: 20pt; font-family:Arial; color:#6C6B6B;text-decoration: none;}
        .gv_item_alternating_row{height:24px; text-align:left;font-size: 9pt;font-family:Arial; background-color:#F9F9F9;}
        .gv_item_row{height:24px; text-align:left;font-size: 9pt;font-family:Arial}
        .gv_selected_row{height:24px; padding-left:2px;text-align:left;font-size: 9pt;font-family:Arial}
        .gv_pager{}                     
    </style>
    
    <style type="text/css"> 
      .hidden{display:none}
      .show{display:block}
    </style> 
</head>
<body>
    <form id="form1" runat="server">
    <script type="text/javascript">
        function key_press_ins_del(i_gv,i_line)
        {
            // insert 按键时
            if(event.keyCode == 45)
            {
                __doPostBack(i_gv,"add:"  + i_line);
            } 
            
            // delete 按键时
            if(event.keyCode == 46 && confirm("您确认的要删除第 " + i_line + " 行的记录吗？"))
            {
                __doPostBack(i_gv,"del:" + i_line);
            }                       
        }
        
        function opt_report(i_type)
        {
            // Save
            if(i_type == "opt_data_add" && confirm("您确认的要保存当前设置吗？"))
            {
                __doPostBack(i_type);
            } 
            
            // Delete
            if(i_type == "opt_data_delete" && confirm("您确认要删除当前弹出框吗？"))
            {
                __doPostBack(i_type,"");
            }                       
        }         
  
	    function winOpenPopup(strURL,str_width,str_height,str_value,str_element,str_postback,str_multiple)
	    {
	        try
	        {
	            var var_time =new Date();
		        var winoption ="dialogWidth="+(parseInt(str_width) + 18)+"px;dialogHeight="+str_height+"px;dialogLeft: status:no; directories:yes;scrollbars:auto;Resizable=yes;";		
		        var tmp=window.showModalDialog(strURL+"&vt="+var_time,'',winoption);
        		
		        if(tmp != null &&  tmp != "" && tmp != undefined)
		        {
		            var o= eval('(' + tmp + ')'); 	
		            
		            //是否多选
		            if(str_multiple == "0")
		            {	        
		                document.getElementById(str_element).value=eval("o." + str_value);
		            }else
		            {
		                document.getElementById(str_element).value = document.getElementById(str_element).value + eval("o." + str_value) + ",";
		            }
    		        
		            //是否Postback
		            if(str_postback == "1")
		            {
		                //document.getElementById(str_element).onchange();
		                __doPostBack("change:"  + document.getElementById(str_element).value,"");
		            }
		        }
		    }catch(e)
		    {
		    }
	    }                    
    </script>
    <!------------------------------------------------基本信息--------------------------------------------------->
      <div>
        <fieldset style="border:solid 1px #45A1C3; margin:0px 0px 0px 0px;">
           <legend style="font-weight: bold; font-size: 9pt; color: #45A1C3; font-family:Arial">基本信息</legend>
           <table cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td style="width: 6px; height: 48px;"></td>
                    <td style="height: 48px; width:auto;">
                        <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                            <tr>
                                <td style="width: 80px; height: 26px;">
                                    <font face="Arial" style="font-size: 9pt">编号：</font></td>
                                <td style="height: 26px">
                                    <H2:Dialog id="txt_cfg_no"  runat="server" AutoPostBack="true" maxlength="8" ontextchanged="txt_cfg_no_TextChanged" width="80px"></H2:Dialog></td>
                                <td style="height: 26px">
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 80px; height: 26px">
                                    <span style="font-size: 9pt; font-family: Arial">上级菜单：</span></td>
                                <td style="height: 26px">
                                    <asp:DropDownList ID="drp_menu" runat="server" Width="160px">
                                    </asp:DropDownList></td>
                                <td style="height: 26px">
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 80px; height: 26px;">
                                    <font face="Arial" style="font-size: 9pt">中文名称：</font></td>
                                <td style="height: 26px">
                                    <asp:TextBox ID="txt_cfg_name_cn" runat="server" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" Height="17px" Width="260px"></asp:TextBox></td>
                                <td style="height: 26px">
                                </td>
                            </tr>
                            <tr>
                                <td style="width: 80px; height: 26px;">
                                    <font face="Arial" style="font-size: 9pt">英文名称：</font></td>
                                <td style="height: 26px">
                                    <asp:TextBox ID="txt_cfg_name_en" runat="server" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" Height="17px" Width="260px"></asp:TextBox><asp:Label ID="lbl_information" runat="server" Font-Names="Arial" Font-Size="9pt"
                                        ForeColor="Red" Width="290px"></asp:Label></td>
                                <td style="height: 26px">
                                    &nbsp;</td>
                            </tr>
                            <tr>
                                <td style="width: 80px; height: 26px">
                                    <font face="Arial" style="font-size: 9pt">权限工作组：</font></td>
                                <td style="height: 26px">
                                    <H2:Dialog ID="txt_cfg_group" runat="server" Width="260px"></H2:Dialog><font face="Arial" style="font-size: 9pt">&nbsp;&nbsp;数据库：</font><asp:DropDownList 
                                        ID="drp_cfg_db" runat="server" Width="70px" AutoPostBack="true"
                                        onselectedindexchanged="drp_cfg_db_SelectedIndexChanged">
                                    </asp:DropDownList><span style="font-size: 9pt; font-family: Arial"><font face="Arial" style="font-size: 9pt">&nbsp;&nbsp;表：</font><asp:DropDownList 
                                        ID="drp_cfg_table" runat="server" AutoPostBack="true" Width="160px" 
                                        onselectedindexchanged="drp_cfg_table_SelectedIndexChanged">
                                    </asp:DropDownList>&nbsp;&nbsp;排序：</span><asp:TextBox ID="txt_cfg_sequence" runat="server" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" Height="17px" MaxLength="8" Width="38px"></asp:TextBox></td>
                                <td style="height: 26px">
                                    <asp:Button ID="btn_delete" runat="server" Text="删除" Width="70px" Visible="False" OnClientClick="javascript:opt_report('opt_data_delete');" />&nbsp;&nbsp;<asp:Button ID="btn_save" runat="server" Text="保存" Width="70px" OnClientClick="javascript:opt_report('opt_data_add');" /></td>
                            </tr>
                        </table>
                     </td>
                </tr>
           </table>
         </fieldset>
    </div>
    
    <!------------------------------------------------字段名称--------------------------------------------------->
    <div>
        <fieldset style="border:solid 1px #45A1C3; margin:0px 0px 0px 0px;">
           <legend style="font-weight: bold; font-size: 9pt; color: #45A1C3; font-family:Arial">字段名称</legend>
            <table cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td style="width:1px; height: 20px">
                    </td>
                    <td style="height: 20px" valign="top">
                        <asp:GridView ID="gv_field" runat="server" Width="100%" CssClass="gv_boder" BorderColor="#ACA899" BorderWidth="0px" GridLines="Both" BorderStyle="None" AutoGenerateColumns="False" PageSize="100" AllowSorting="True" OnRowDataBound="gv_field_RowDataBound">
                            <RowStyle CssClass="gv_item_row" />
                            <AlternatingRowStyle CssClass="gv_item_alternating_row"/>
                            <SelectedRowStyle CssClass="gv_selected_row" />
                            <PagerStyle CssClass="gv_pager"/>
                            <Columns>
                                <asp:BoundField DataField="cfg_f_no">
                                    <ItemStyle Width="0px" CssClass="hidden"/>
                                    <HeaderStyle  Width="0px" CssClass="hidden"/>
                                </asp:BoundField>
                                                            
                                <asp:TemplateField HeaderText="标识">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_f_name" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="100px"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="100" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="中文">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_f_name_cn" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="160"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="160" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="英文">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_f_name_en" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="160"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                            
                                    <HeaderStyle Width="160" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>  
                                
                                <asp:TemplateField HeaderText="类型">
                                    <ItemTemplate>
                                        <asp:DropDownList ID="drp_cfg_f_type" runat="server" Width="80" Enabled="false">
                                           <asp:ListItem Value="0">字符</asp:ListItem>
                                            <asp:ListItem Value="1">数字</asp:ListItem>      
                                            <asp:ListItem Value="2">日期</asp:ListItem>                                                                                      
                                        </asp:DropDownList>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="80px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>  
                                
                                <asp:TemplateField HeaderText="列宽">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_f_width" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="30px"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="30px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField> 
                                
                                <asp:TemplateField HeaderText="排序">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_f_sequence" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="30px"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="30px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>    
                                
                                <asp:TemplateField HeaderText="显示">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chk_cfg_f_is_show" runat="server" />
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="50px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField> 
                                
                                <asp:TemplateField HeaderText="导出">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chk_cfg_f_is_export" runat="server" />
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="50px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="主键">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chk_cfg_f_is_key" runat="server" />
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="50px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="">
                                    <ItemTemplate>
                                        <asp:Label ID="e" runat="server"></asp:Label>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="240" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>
                                
                            </Columns>
                            <PagerTemplate>                               
                            </PagerTemplate>
                        </asp:GridView>
                    </td>
                    <td style="width:1px; height: 20px">
                    </td>
                </tr>
                <tr>
                    <td style="height: 20px">
                    </td>
                    <td style="height: 20px">
                    </td>
                    <td style="height: 20px">
                    </td>
                </tr>
            </table>
        </fieldset>
    </div> 
        
    <!------------------------------------------------查询参数--------------------------------------------------->
    <div>
        <fieldset style="border:solid 1px #45A1C3; margin:0px 0px 0px 0px;">
           <legend style="font-weight: bold; font-size: 9pt; color: #45A1C3; font-family:Arial">查询参数</legend>
            <table cellpadding="0" cellspacing="0" width="100%">
                <tr>
                    <td style="width:1px; height: 20px">
                    </td>
                    <td style="height: 20px" valign="top">
                        <asp:GridView ID="gv_search" runat="server" Width="100%" CssClass="gv_boder" BorderColor="#ACA899" BorderWidth="0px" GridLines="Both" BorderStyle="None" AutoGenerateColumns="False" PageSize="100" AllowSorting="True" OnRowDataBound="gv_search_RowDataBound">
                            <RowStyle CssClass="gv_item_row" />
                            <AlternatingRowStyle CssClass="gv_item_alternating_row"/>
                            <SelectedRowStyle CssClass="gv_selected_row" />
                            <PagerStyle CssClass="gv_pager"/>
                            <Columns>
                                <asp:BoundField DataField="cfg_s_no">
                                    <ItemStyle Width="0px" CssClass="hidden"/>
                                    <HeaderStyle  Width="0px" CssClass="hidden"/>
                                </asp:BoundField>
                                                            
                                <asp:TemplateField HeaderText="标识">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_s_name" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="66px"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="66px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="中文">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_s_name_cn" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="100px"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="100px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="英文">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_s_name_en" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="100px"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                            
                                    <HeaderStyle Width="100px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>                                  
                              
                                <asp:TemplateField HeaderText="行">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_s_row" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="30px"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="30px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField> 
                                
                                <asp:TemplateField HeaderText="列数">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_s_colspan" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="30px"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="30px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>    
                                
                                <asp:TemplateField HeaderText="排序">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_s_sequence" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="30px"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="30px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="参数类型">
                                    <ItemTemplate>
                                        <asp:DropDownList ID="drp_cfg_s_type" runat="server" Width="90">
                                            <asp:ListItem Value="1">文本框</asp:ListItem>
                                            <asp:ListItem Value="2">复选框</asp:ListItem> 
                                            <asp:ListItem Value="3">日期框</asp:ListItem>                                             
                                            <asp:ListItem Value="4">下拉列表框</asp:ListItem>                                                                                                                                
                                            <asp:ListItem Value="5">弹出单选框</asp:ListItem>
                                            <asp:ListItem Value="6">弹出多选框</asp:ListItem>                                                                         
                                        </asp:DropDownList>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="90px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>                                  
                                
                                <asp:TemplateField HeaderText="对应SQL">
                                    <ItemTemplate>
                                        <H2:Dialog id="txt_cfg_s_sql" runat="server" maxlength="8" width="80px"></H2:Dialog>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="80px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField> 
                                
                                <asp:TemplateField HeaderText="返回列">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_s_sql_return" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="50px"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="50px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>                                 
                                
                                <asp:TemplateField HeaderText="SQL参数">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_s_sql_para" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="100px"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="100px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="默认值">
                                    <ItemTemplate>
                                        <asp:TextBox ID="txt_cfg_s_default" BorderColor="#7F9DB9" BorderStyle="Solid" BorderWidth="1px" runat="server" Width="60px"></asp:TextBox>
                                    </ItemTemplate> 
                                    <ItemStyle  ForeColor="#6C6B6B" HorizontalAlign="Left" />                                
                                    <HeaderStyle Width="60px" Font-Names="Arial" Font-Overline="False" Font-Size="9pt" Font-Underline="False" Font-Bold="false" ForeColor="#6C6B6B" />
                                </asp:TemplateField>                                                              
                            </Columns>                            
                            <PagerTemplate>                               
                            </PagerTemplate>
                        </asp:GridView> 
                        </td>
                    <td style="width:1px; height: 20px">
                    </td>
                </tr>
                <tr>
                    <td style="height: 20px">
                    </td>
                    <td style="height: 20px">
                    </td>
                    <td style="height: 20px">
                    </td>
                </tr>
            </table>
        </fieldset>
    </div>   
   
    </form>
</body>
</html>
